load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "argo.go",
        "argo_fake.go",
        "kfam.go",
        "kfam_fake.go",
        "kubernetes_core.go",
        "kubernetes_core_fake.go",
        "minio.go",
        "pod_fake.go",
        "scheduled_workflow_fake.go",
        "sql.go",
        "swf.go",
        "swf_fake.go",
        "workflow_fake.go",
    ],
    importpath = "github.com/kubeflow/pipelines/backend/src/apiserver/client",
    visibility = ["//visibility:public"],
    deps = [
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
        "//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_argoproj_argo//pkg/client/clientset/versioned:go_default_library",
        "@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
        "@com_github_cenkalti_backoff//:go_default_library",
        "@com_github_go_sql_driver_mysql//:go_default_library",
        "@com_github_golang_glog//:go_default_library",
        "@com_github_minio_minio_go//:go_default_library",
        "@com_github_minio_minio_go//pkg/credentials:go_default_library",
        "@com_github_pkg_errors//:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_api//policy/v1beta1:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@io_k8s_apimachinery//pkg/watch:go_default_library",
        "@io_k8s_client_go//kubernetes:go_default_library",
        "@io_k8s_client_go//kubernetes/typed/core/v1:go_default_library",
        "@io_k8s_client_go//rest:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "kfam_test.go",
        "sql_test.go",
    ],
    data = glob(["test/**/*"]),  # keep
    embed = [":go_default_library"],
    deps = [
        "@com_github_go_sql_driver_mysql//:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
    ],
)
